<?php
return [
    'id' => 'course-form',
    'template' => 'form_default',
    'enableClientValidation' => false,
    'enableAjaxValidation' => true,
    'options' => [],
    'models' => [
        'course' => [
            'title' => '添加课程',
            'th_with' => 60,
            'elements' => [
                'type_id'=>[
                    'type'=>'widget',
                    'class'=> \kartik\select2\Select2::className(),
                    'data' => [1=>'益智',2=>'音乐',3=>'形体',4=>'中老年'],
                    'options' => ['placeholder' => '请选择...']
                ],
//                'category_id'=>[
//                    'type'=>'dropdownlist',
//                    'options'=>[
//                        'prompt'=>'选择课程分类',
//                        'encode'=>false,
//                    ],
//                ],
                'category_id'=>[
                    'type'=>'widget',
                    'class'=> \kartik\select2\Select2::className(),
                    'data' =>[],
                    'options' => ['placeholder' => '选择课程分类','encode'=>false]
                ],
                'name' => [
                    'type' => 'text',
                    'options' => ['class' => 'input-text']
                ],
                'mechince_id' => [
                    'type'=>'dropdownlist',
                    'options'=>[
                        'prompt'=>'选择机构名称',
                        'encode'=>false,
                    ],
                    'items'=>[],
                ],
                'description' => [
                    'type'=>'widget',
                    'class'=>\doumiaoduo\ueditor\Ueditor::className(),
                    'clientOptions'=>[
                        'serverUrl'=>\common\components\helpers\Fun::url(['/uploader/action']),
                        'toolbars'=>[['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript','rowspacingtop', 'rowspacingbottom', 'lineheight', '|','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','simpleupload','removeformat']],
                        'initialFrameWidth'=>'100%'
                    ],
                ],
                'teache_form' => [
                    'type'=>'radiolist',
                    'items'=>[
                        '2'=>'普通班',
                        '1'=>'小班制',
                        '0'=>'一对一',
                        '3'=>'一对二',
                        '4'=>'一对三',
                    ]
                ],
            ],
        ]
    ]
];
